﻿using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Security.Principal;
using System.Text;

namespace Icoders.MarketTracker.Web.Lib.Security
{
    public class CustomIdentity:IIdentity
    {
        private bool _bIsAuthenticated;
        private string _sAuthenticationType;
        private string _sUserName;
        private StringCollection _lsRoles = new StringCollection();
        private bool _hasChangePassword;
        public CustomIdentity(bool bIsAuthenticated, string sAuthenticationType, string sUserName, bool hasChangePassword)
        {
            _bIsAuthenticated = bIsAuthenticated;
            _sAuthenticationType = sAuthenticationType;
            _sUserName = sUserName;
            _hasChangePassword = hasChangePassword;
        }

        


        public bool HasChangedPassword
        {
            get { return _hasChangePassword; }
        }
        public string Name
        {
            get { return _sUserName; }
        }

        public string AuthenticationType
        {
            get { return _sAuthenticationType; }
        }

        public bool IsAuthenticated
        {
            get { return _bIsAuthenticated; }
        }
        public StringCollection Roles
        {
            get { return _lsRoles; }
        }
    }
}
